package cn.fzkj.strategy;

public abstract class Duck {
    FlyBehavior flyBehavior;

    public void fly(){
        flyBehavior.fly();
    }

    // 叫
    public void quack(){
        System.out.println("=== 鸭子叫 ===");
    }
    // 游泳
    public void swim(){
        System.out.println("=== 鸭子游泳 ===");
    }
    // 展示的颜色
    public abstract void display();

    public void setFlyBehavior(FlyBehavior flyBehavior) {
        this.flyBehavior = flyBehavior;
    }
}
